#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2021/6/17 
# @Author  : Mik
import pytest
from common.logger import logger
from common.read_config import load
from common.mysql_operate import my_db

user_mange_api_data = load('user_mange_api_data.yaml')


@pytest.fixture(scope='module', autouse=True)
def cases_log(request):
    cases_name = request.fspath
    logger.info(f'********** 开始执行文件：{cases_name} *****')
    yield
    logger.info(f'********** 结束执行文件：{cases_name} *****')


@pytest.fixture(autouse=True)
def function_log(request):
    testcase_name = request.function.__name__
    logger.info(f'********** 开始执行用例：{testcase_name} *****')
    yield
    logger.info(f'********** 结束执行用例：{testcase_name} *****')



